home *** CD-ROM | disk | FTP | other *** search
/ Gold Medal Software 1 / Gold Medal Software Volume 1 (Gold Medal) (1994).iso / prog / objeng.arj / SAMPLE.ARJ / TEST.HPP < prev    next >
Encoding:
C/C++ Source or Header  |  1993-07-08  |  2.3 KB  |  77 lines

  1. /****************************************************************************
  2.  * Generated by OEGen.
  3.  * Comments.......  This file contains the class definitions for the user-
  4.  *                   defined classes derived from PersistClass.
  5.  *                  Automatically generated.
  6.  *
  7.  ***************************************************************************/
  8.  
  9. #ifndef _DBCLASSOEH_
  10. #define _DBCLASSOEH_
  11.  
  12. #include "objeng.hpp"
  13.  
  14. //------------------------------------------------------------
  15. class Client :  public PersistClass {
  16. protected:
  17.   long id;
  18.   char fname[13];
  19.   OEList *tests;
  20.   virtual int Retrieve();
  21. public:
  22.   Client();
  23.   Client(Client &val) : PersistClass() { operator=(val); }
  24.   ~Client() {  
  25.     if ((tests != NULL) && (tests->DeleteOK() == TRUE)) delete tests;   }
  26.   Client &operator=(const Client&);
  27.   virtual int LinkToKey(int, int);
  28.   virtual int Store();
  29.   // Data access functions to maintain encapsulation
  30.   void Setid(long inid) { id = inid; }
  31.   void Setfname(char *infname) { strcpy(fname, infname); }
  32.   const long& Getid() { return id; }
  33.   const char* Getfname() { return fname; }
  34.   OEList* Gettests() { return tests; }
  35. };
  36.  
  37.  
  38. //------------------------------------------------------------
  39. class Test :  public PersistClass {
  40. protected:
  41.   long id;
  42.   long uid;
  43.   float weight;
  44.   short score;
  45.   struct tm date;
  46.   float height;
  47.   virtual int Retrieve();
  48. public:
  49.   Test();
  50.   Test(Test &val) : PersistClass() { operator=(val); }
  51.   ~Test() {  }
  52.   Test &operator=(const Test&);
  53.   virtual int LinkToKey(int, int);
  54.   virtual int Store();
  55.   // Data access functions to maintain encapsulation
  56.   void Setid(long inid) { id = inid; }
  57.   void Setuid(long inuid) { uid = inuid; }
  58.   void Setweight(float inweight) { weight = inweight; }
  59.   void Setscore(short inscore) { score = inscore; }
  60.   void Setdate(struct tm &indate)
  61.   {
  62.     date.tm_mday = indate.tm_mday;
  63.     date.tm_mon = indate.tm_mon;
  64.     date.tm_year = indate.tm_year;
  65.   }
  66.   void Setheight(float inheight) { height = inheight; }
  67.   const long& Getid() { return id; }
  68.   const long& Getuid() { return uid; }
  69.   const float& Getweight() { return weight; }
  70.   const short& Getscore() { return score; }
  71.   const struct tm& Getdate() { return date; }
  72.   const float& Getheight() { return height; }
  73. };
  74.  
  75.  
  76.  
  77. #endif